﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admins/Administrator.master" AutoEventWireup="true" CodeFile="Contact.aspx.cs" Inherits="FacebookApp.Admins_Contact" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="title">
        Contact Manager, feedback</div>
    <asp:Panel ID="pnShow" runat="server" Width="100%">
        <table id="Table1" style="border-collapse: collapse; background-color: #EBEEF4;"
            cellpadding="0" width="100%" border="0">
            <tr>
                <td>
                    <asp:Button ID="btnXoa" runat="server" class="fb_invite_button" Text="Xóa" OnClick="btnXoa_Click"
                        OnClientClick="return confirm('Bạn có muốn xóa không?')" />
                </td>
            </tr>
        </table>
        <asp:DataGrid ID="grdContact" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            CellPadding="4" ForeColor="#333333" Width="100%" OnPageIndexChanged="grdContact_PageIndexChanged"
            PageSize="10" OnItemCommand="grdContact_ItemCommand" OnItemDataBound="grdContact_ItemDataBound">
            <AlternatingItemStyle BackColor="White" />
            <HeaderStyle CssClass="trHeader"></HeaderStyle>
            <Columns>
                <asp:TemplateColumn ItemStyle-CssClass="tdCenter">
                    <HeaderTemplate>
                        <asp:CheckBox ID="chkSelectAll" runat="server" AutoPostBack="False"></asp:CheckBox></HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server"></asp:CheckBox></ItemTemplate>
                    <ItemStyle CssClass="tdCenter"></ItemStyle>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="ID" HeaderText="ID" Visible="false"></asp:BoundColumn>
                <asp:BoundColumn DataField="Name" HeaderText="Name"></asp:BoundColumn>
                <asp:BoundColumn DataField="Company" HeaderText="Company"></asp:BoundColumn>
                <asp:BoundColumn DataField="Phone" HeaderText="Phone"></asp:BoundColumn>
                <asp:BoundColumn DataField="Mail" HeaderText="Mail"></asp:BoundColumn>
                <asp:TemplateColumn>
                    <HeaderTemplate>
                        Ngày tạo</HeaderTemplate>
                    <ItemTemplate>
                        <%#DateTimeClass.ConvertDate(Eval("Date").ToString(),"MM/dd/yyyy") %></ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn>
                    <HeaderTemplate>
                        Trạng thái</HeaderTemplate>
                    <ItemTemplate>
                        <%#Status(Eval("Status").ToString())%></ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center">
                    <HeaderTemplate>
                        Chức năng</HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="lbt1" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"ID")%>'
                            CommandName="Edit" CssClass="edit" ToolTip="Edit">&nbsp;</asp:LinkButton>|<asp:LinkButton
                                ID="lbt2" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"ID")%>'
                                CommandName="Delete" CssClass="delete" OnClientClick="return confirm(&quot;Bạn có muốn xóa không?&quot;)"
                                ToolTip="Delete">&nbsp;</asp:LinkButton></ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                </asp:TemplateColumn>
            </Columns>
            <EditItemStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
            <ItemStyle BackColor="#EFF3FB" />
            <PagerStyle BackColor="#F3F8FE" ForeColor="Blue" HorizontalAlign="Center" Mode="NumericPages" />
            <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        </asp:DataGrid></asp:Panel>
    <asp:Panel ID="pnUpdate" runat="server" Visible="False" Width="100%">
        <table id="Table2" style="border-collapse: collapse" cellpadding="0" width="100%"
            border="0">
            <tr>
                <td width="150" height="10">
                </td>
                <td height="10">
                </td>
            </tr>
            <tr style="display: none;">
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblID" runat="server">ID</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtID" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblName" runat="server">Name</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblCompany" runat="server">Company</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCompany" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblAddress" runat="server">Address</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblPhone" runat="server">Phone</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtPhone" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblMail" runat="server">Mail</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtMail" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblDetail" runat="server">Detail</asp:Label>
                </td>
                <td>
                    <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="~/fckeditor/" 
                        Width="80%" Height="400px">
                    </FCKeditorV2:FCKeditor>
                </td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblStatus" runat="server">Status</asp:Label>
                </td>
                <td>
                    <%--<asp:TextBox ID="txtStatus" runat="server" Width="200px"></asp:TextBox>--%>
                    <asp:DropDownList ID="ddlStatus" runat="server" Width="200px">
                        <asp:ListItem>False</asp:ListItem>
                        <asp:ListItem>True</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <%--<tr>
                <td width="150" class="name_fild_row">
                    &nbsp;<asp:Label ID="lblDate" runat="server">Date for use</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtDate" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>--%>
            <tr>
                <td width="150">
                    &nbsp;
                </td>
                <td>
                    &nbsp;<asp:LinkButton ID="lbtUpdate" CssClass="update" runat="server" OnClick="lblUpdate_Click">Update</asp:LinkButton>&nbsp;&nbsp;<asp:LinkButton
                        ID="lblBack" runat="server" CssClass="back" OnClick="lblBack_Click">Trở lại</asp:LinkButton>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>

